﻿using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using Google.Protobuf;
using Google.Protobuf.Reflection;

namespace EggLink.DanhengServer.Proto
{
	// Token: 0x02000987 RID: 2439
	[DebuggerDisplay("{ToString(),nq}")]
	public sealed class Item : IMessage<Item>, IMessage, IEquatable<Item>, IDeepCloneable<Item>, IBufferMessage
	{
		// Token: 0x17001EE2 RID: 7906
		// (get) Token: 0x06006D78 RID: 28024 RVA: 0x001255C5 File Offset: 0x001237C5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageParser<Item> Parser
		{
			get
			{
				return Item._parser;
			}
		}

		// Token: 0x17001EE3 RID: 7907
		// (get) Token: 0x06006D79 RID: 28025 RVA: 0x001255CC File Offset: 0x001237CC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public static MessageDescriptor Descriptor
		{
			get
			{
				return ItemReflection.Descriptor.MessageTypes[0];
			}
		}

		// Token: 0x17001EE4 RID: 7908
		// (get) Token: 0x06006D7A RID: 28026 RVA: 0x001255DE File Offset: 0x001237DE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		MessageDescriptor IMessage.Descriptor
		{
			get
			{
				return Item.Descriptor;
			}
		}

		// Token: 0x06006D7B RID: 28027 RVA: 0x001255E5 File Offset: 0x001237E5
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Item()
		{
		}

		// Token: 0x06006D7C RID: 28028 RVA: 0x001255F0 File Offset: 0x001237F0
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Item(Item other) : this()
		{
			this.mainAffixId_ = other.mainAffixId_;
			this.level_ = other.level_;
			this.rank_ = other.rank_;
			this.promotion_ = other.promotion_;
			this.itemId_ = other.itemId_;
			this.uniqueId_ = other.uniqueId_;
			this.num_ = other.num_;
			this._unknownFields = UnknownFieldSet.Clone(other._unknownFields);
		}

		// Token: 0x06006D7D RID: 28029 RVA: 0x00125668 File Offset: 0x00123868
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public Item Clone()
		{
			return new Item(this);
		}

		// Token: 0x17001EE5 RID: 7909
		// (get) Token: 0x06006D7E RID: 28030 RVA: 0x00125670 File Offset: 0x00123870
		// (set) Token: 0x06006D7F RID: 28031 RVA: 0x00125678 File Offset: 0x00123878
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint MainAffixId
		{
			get
			{
				return this.mainAffixId_;
			}
			set
			{
				this.mainAffixId_ = value;
			}
		}

		// Token: 0x17001EE6 RID: 7910
		// (get) Token: 0x06006D80 RID: 28032 RVA: 0x00125681 File Offset: 0x00123881
		// (set) Token: 0x06006D81 RID: 28033 RVA: 0x00125689 File Offset: 0x00123889
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Level
		{
			get
			{
				return this.level_;
			}
			set
			{
				this.level_ = value;
			}
		}

		// Token: 0x17001EE7 RID: 7911
		// (get) Token: 0x06006D82 RID: 28034 RVA: 0x00125692 File Offset: 0x00123892
		// (set) Token: 0x06006D83 RID: 28035 RVA: 0x0012569A File Offset: 0x0012389A
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Rank
		{
			get
			{
				return this.rank_;
			}
			set
			{
				this.rank_ = value;
			}
		}

		// Token: 0x17001EE8 RID: 7912
		// (get) Token: 0x06006D84 RID: 28036 RVA: 0x001256A3 File Offset: 0x001238A3
		// (set) Token: 0x06006D85 RID: 28037 RVA: 0x001256AB File Offset: 0x001238AB
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Promotion
		{
			get
			{
				return this.promotion_;
			}
			set
			{
				this.promotion_ = value;
			}
		}

		// Token: 0x17001EE9 RID: 7913
		// (get) Token: 0x06006D86 RID: 28038 RVA: 0x001256B4 File Offset: 0x001238B4
		// (set) Token: 0x06006D87 RID: 28039 RVA: 0x001256BC File Offset: 0x001238BC
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint ItemId
		{
			get
			{
				return this.itemId_;
			}
			set
			{
				this.itemId_ = value;
			}
		}

		// Token: 0x17001EEA RID: 7914
		// (get) Token: 0x06006D88 RID: 28040 RVA: 0x001256C5 File Offset: 0x001238C5
		// (set) Token: 0x06006D89 RID: 28041 RVA: 0x001256CD File Offset: 0x001238CD
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint UniqueId
		{
			get
			{
				return this.uniqueId_;
			}
			set
			{
				this.uniqueId_ = value;
			}
		}

		// Token: 0x17001EEB RID: 7915
		// (get) Token: 0x06006D8A RID: 28042 RVA: 0x001256D6 File Offset: 0x001238D6
		// (set) Token: 0x06006D8B RID: 28043 RVA: 0x001256DE File Offset: 0x001238DE
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public uint Num
		{
			get
			{
				return this.num_;
			}
			set
			{
				this.num_ = value;
			}
		}

		// Token: 0x06006D8C RID: 28044 RVA: 0x001256E7 File Offset: 0x001238E7
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override bool Equals(object other)
		{
			return this.Equals(other as Item);
		}

		// Token: 0x06006D8D RID: 28045 RVA: 0x001256F8 File Offset: 0x001238F8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public bool Equals(Item other)
		{
			return other != null && (other == this || (this.MainAffixId == other.MainAffixId && this.Level == other.Level && this.Rank == other.Rank && this.Promotion == other.Promotion && this.ItemId == other.ItemId && this.UniqueId == other.UniqueId && this.Num == other.Num && object.Equals(this._unknownFields, other._unknownFields)));
		}

		// Token: 0x06006D8E RID: 28046 RVA: 0x00125794 File Offset: 0x00123994
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override int GetHashCode()
		{
			int num = 1;
			if (this.MainAffixId != 0U)
			{
				num ^= this.MainAffixId.GetHashCode();
			}
			if (this.Level != 0U)
			{
				num ^= this.Level.GetHashCode();
			}
			if (this.Rank != 0U)
			{
				num ^= this.Rank.GetHashCode();
			}
			if (this.Promotion != 0U)
			{
				num ^= this.Promotion.GetHashCode();
			}
			if (this.ItemId != 0U)
			{
				num ^= this.ItemId.GetHashCode();
			}
			if (this.UniqueId != 0U)
			{
				num ^= this.UniqueId.GetHashCode();
			}
			if (this.Num != 0U)
			{
				num ^= this.Num.GetHashCode();
			}
			if (this._unknownFields != null)
			{
				num ^= this._unknownFields.GetHashCode();
			}
			return num;
		}

		// Token: 0x06006D8F RID: 28047 RVA: 0x00125869 File Offset: 0x00123A69
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public override string ToString()
		{
			return JsonFormatter.ToDiagnosticString(this);
		}

		// Token: 0x06006D90 RID: 28048 RVA: 0x00125871 File Offset: 0x00123A71
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void WriteTo(CodedOutputStream output)
		{
			output.WriteRawMessage(this);
		}

		// Token: 0x06006D91 RID: 28049 RVA: 0x0012587C File Offset: 0x00123A7C
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalWriteTo(ref WriteContext output)
		{
			if (this.Level != 0U)
			{
				output.WriteRawTag(32);
				output.WriteUInt32(this.Level);
			}
			if (this.MainAffixId != 0U)
			{
				output.WriteRawTag(40);
				output.WriteUInt32(this.MainAffixId);
			}
			if (this.Promotion != 0U)
			{
				output.WriteRawTag(48);
				output.WriteUInt32(this.Promotion);
			}
			if (this.Num != 0U)
			{
				output.WriteRawTag(64);
				output.WriteUInt32(this.Num);
			}
			if (this.Rank != 0U)
			{
				output.WriteRawTag(80);
				output.WriteUInt32(this.Rank);
			}
			if (this.ItemId != 0U)
			{
				output.WriteRawTag(96);
				output.WriteUInt32(this.ItemId);
			}
			if (this.UniqueId != 0U)
			{
				output.WriteRawTag(112);
				output.WriteUInt32(this.UniqueId);
			}
			if (this._unknownFields != null)
			{
				this._unknownFields.WriteTo(ref output);
			}
		}

		// Token: 0x06006D92 RID: 28050 RVA: 0x00125964 File Offset: 0x00123B64
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public int CalculateSize()
		{
			int num = 0;
			if (this.MainAffixId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.MainAffixId);
			}
			if (this.Level != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Level);
			}
			if (this.Rank != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Rank);
			}
			if (this.Promotion != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Promotion);
			}
			if (this.ItemId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.ItemId);
			}
			if (this.UniqueId != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.UniqueId);
			}
			if (this.Num != 0U)
			{
				num += 1 + CodedOutputStream.ComputeUInt32Size(this.Num);
			}
			if (this._unknownFields != null)
			{
				num += this._unknownFields.CalculateSize();
			}
			return num;
		}

		// Token: 0x06006D93 RID: 28051 RVA: 0x00125A34 File Offset: 0x00123C34
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(Item other)
		{
			if (other == null)
			{
				return;
			}
			if (other.MainAffixId != 0U)
			{
				this.MainAffixId = other.MainAffixId;
			}
			if (other.Level != 0U)
			{
				this.Level = other.Level;
			}
			if (other.Rank != 0U)
			{
				this.Rank = other.Rank;
			}
			if (other.Promotion != 0U)
			{
				this.Promotion = other.Promotion;
			}
			if (other.ItemId != 0U)
			{
				this.ItemId = other.ItemId;
			}
			if (other.UniqueId != 0U)
			{
				this.UniqueId = other.UniqueId;
			}
			if (other.Num != 0U)
			{
				this.Num = other.Num;
			}
			this._unknownFields = UnknownFieldSet.MergeFrom(this._unknownFields, other._unknownFields);
		}

		// Token: 0x06006D94 RID: 28052 RVA: 0x00125AE8 File Offset: 0x00123CE8
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		public void MergeFrom(CodedInputStream input)
		{
			input.ReadRawMessage(this);
		}

		// Token: 0x06006D95 RID: 28053 RVA: 0x00125AF4 File Offset: 0x00123CF4
		[DebuggerNonUserCode]
		[GeneratedCode("protoc", null)]
		void IBufferMessage.InternalMergeFrom(ref ParseContext input)
		{
			uint num;
			while ((num = input.ReadTag()) != 0U)
			{
				if (num <= 48U)
				{
					if (num == 32U)
					{
						this.Level = input.ReadUInt32();
						continue;
					}
					if (num == 40U)
					{
						this.MainAffixId = input.ReadUInt32();
						continue;
					}
					if (num == 48U)
					{
						this.Promotion = input.ReadUInt32();
						continue;
					}
				}
				else if (num <= 80U)
				{
					if (num == 64U)
					{
						this.Num = input.ReadUInt32();
						continue;
					}
					if (num == 80U)
					{
						this.Rank = input.ReadUInt32();
						continue;
					}
				}
				else
				{
					if (num == 96U)
					{
						this.ItemId = input.ReadUInt32();
						continue;
					}
					if (num == 112U)
					{
						this.UniqueId = input.ReadUInt32();
						continue;
					}
				}
				this._unknownFields = UnknownFieldSet.MergeFieldFrom(this._unknownFields, ref input);
			}
		}

		// Token: 0x040029B0 RID: 10672
		private static readonly MessageParser<Item> _parser = new MessageParser<Item>(() => new Item());

		// Token: 0x040029B1 RID: 10673
		private UnknownFieldSet _unknownFields;

		// Token: 0x040029B2 RID: 10674
		public const int MainAffixIdFieldNumber = 5;

		// Token: 0x040029B3 RID: 10675
		private uint mainAffixId_;

		// Token: 0x040029B4 RID: 10676
		public const int LevelFieldNumber = 4;

		// Token: 0x040029B5 RID: 10677
		private uint level_;

		// Token: 0x040029B6 RID: 10678
		public const int RankFieldNumber = 10;

		// Token: 0x040029B7 RID: 10679
		private uint rank_;

		// Token: 0x040029B8 RID: 10680
		public const int PromotionFieldNumber = 6;

		// Token: 0x040029B9 RID: 10681
		private uint promotion_;

		// Token: 0x040029BA RID: 10682
		public const int ItemIdFieldNumber = 12;

		// Token: 0x040029BB RID: 10683
		private uint itemId_;

		// Token: 0x040029BC RID: 10684
		public const int UniqueIdFieldNumber = 14;

		// Token: 0x040029BD RID: 10685
		private uint uniqueId_;

		// Token: 0x040029BE RID: 10686
		public const int NumFieldNumber = 8;

		// Token: 0x040029BF RID: 10687
		private uint num_;
	}
}
